home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / thomas / thomas.lha / Thomas / Thomas-1.1 / src / class-structure.scm next >
Text File  |  1992-09-20  |  7KB  |  170 lines

  1. ;*              Copyright 1992 Digital Equipment Corporation
  2. ;*                         All Rights Reserved
  3. ;*
  4. ;* Permission to use, copy, and modify this software and its documentation is
  5. ;* hereby granted only under the following terms and conditions.  Both the
  6. ;* above copyright notice and this permission notice must appear in all copies
  7. ;* of the software, derivative works or modified versions, and any portions
  8. ;* thereof, and both notices must appear in supporting documentation.
  9. ;*
  10. ;* Users of this software agree to the terms and conditions set forth herein,
  11. ;* and hereby grant back to Digital a non-exclusive, unrestricted, royalty-free
  12. ;* right and license under any changes, enhancements or extensions made to the
  13. ;* core functions of the software, including but not limited to those affording
  14. ;* compatibility with other hardware or software environments, but excluding
  15. ;* applications which incorporate this software.  Users further agree to use
  16. ;* their best efforts to return to Digital any such changes, enhancements or
  17. ;* extensions that they make and inform Digital of noteworthy uses of this
  18. ;* software.  Correspondence should be provided to Digital at:
  19. ;* 
  20. ;*            Director, Cambridge Research Lab
  21. ;*            Digital Equipment Corp
  22. ;*            One Kendall Square, Bldg 700
  23. ;*            Cambridge MA 02139
  24. ;* 
  25. ;* This software may be distributed (but not offered for sale or transferred
  26. ;* for compensation) to third parties, provided such third parties agree to
  27. ;* abide by the terms and conditions of this notice.  
  28. ;* 
  29. ;* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  30. ;* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  31. ;* MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
  32. ;* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  33. ;* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  34. ;* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  35. ;* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  36. ;* SOFTWARE.
  37.  
  38. ; $Id: class-structure.scm,v 1.4 1992/09/20 08:42:02 birkholz Exp $
  39.  
  40. ;;;; Build the class structure for Dylan runtime environment.
  41.  
  42. (define <object>
  43.   (make-dylan-class '<object> '() '() #T))
  44.  
  45. ;;;; Number classes
  46.  
  47. ;;; Abstract
  48.  
  49. (define <number>
  50.   (make-dylan-class '<number> (list <object>) '() #F))
  51.  
  52. ;;; Sealed
  53.  
  54. (define <complex>
  55.   (make-dylan-class '<complex> (list <number>) '() #F))
  56. (define <real>
  57.   (make-dylan-class '<real> (list <complex>) '() #F))
  58. (define <rectangular-complex>
  59.   (make-dylan-class '<rectangular-complex> (list <complex>) '() #F))
  60. (define <rational>
  61.   (make-dylan-class '<rational> (list <real>) '() #F))
  62. (define <integer>
  63.   (make-dylan-class '<integer> (list <rational>) '() #F))
  64. (define <ratio>
  65.   (make-dylan-class '<ratio> (list <rational>) '() #F))
  66. (define <float>
  67.   (make-dylan-class '<float> (list <real>) '() #F))
  68. (define <single-float>
  69.   (make-dylan-class '<single-float> (list <float>) '() #F))
  70. (define <double-float>
  71.   (make-dylan-class '<double-float> (list <float>) '() #F))
  72. (define <extended-float>
  73.   (make-dylan-class '<extended-float> (list <float>) '() #F))
  74.  
  75. ;;;; Collections
  76.  
  77. ;;; Abstract
  78.  
  79. (define <collection>
  80.   (make-dylan-class '<collection> (list <object>) '() #F)) 
  81. (define <explicit-key-collection>
  82.   (make-dylan-class '<explicit-key-collection> (list <collection>) '() #F))
  83. (define <mutable-collection>
  84.   (make-dylan-class '<mutable-collection> (list <collection>) '() #F))
  85. (define <sequence>
  86.   (make-dylan-class '<sequence> (list <collection>) '() #F))
  87. (define <mutable-explicit-key-collection> 
  88.   (make-dylan-class '<mutable-explicit-key-collection>
  89.             (list <explicit-key-collection> 
  90.               <mutable-collection>) '() #F))
  91. (define <mutable-sequence>
  92.   (make-dylan-class '<mutable-sequence>
  93.             (list <mutable-collection> <sequence>) '() #F))
  94.  
  95. ;;; Instantiable
  96.  
  97. (define <array>
  98.   (make-dylan-class '<array> (list <mutable-explicit-key-collection>) '() #F))
  99. (define <table>
  100.   (make-dylan-class '<table> (list <mutable-explicit-key-collection>) '() #F))
  101. (define <vector>
  102.   (make-dylan-class '<vector> (list <array> <mutable-sequence>) '() #F))
  103. (define <string>
  104.   (make-dylan-class '<string> (list <mutable-sequence>) '() #F))
  105. (define <deque>
  106.   (make-dylan-class '<deque> (list <mutable-sequence>) '() #F))
  107. (define <range>
  108.   (make-dylan-class '<range> (list <sequence>) '() #F))
  109. (define <stretchy-vector>
  110.   (make-dylan-class '<stretchy-vector> (list <vector>) '() #F))
  111.  
  112. ;;; Sealed
  113.  
  114. (define <simple-object-vector>
  115.   (make-dylan-class '<simple-object-vector> (list <vector>) '() #F))
  116. (define <unicode-string>
  117.   (make-dylan-class '<unicode-string> (list <vector> <string>) '() #F))
  118. (define <byte-string>
  119.   (make-dylan-class '<byte-string> (list <vector> <string>) '() #F))
  120. (define <list>
  121.   (make-dylan-class '<list> (list <mutable-sequence>) '() #F))
  122. (define <pair>
  123.   (make-dylan-class '<pair> (list <list>) '() #F))
  124. (define <empty-list>
  125.   (make-dylan-class '<empty-list> (list <list>) '() #F))
  126.  
  127. ;;;; Conditions
  128.  
  129. (define <condition>
  130.   (make-dylan-class '<condition> (list <object>) '() #F)) 
  131. (define <serious-condition>
  132.   (make-dylan-class '<serious-condition> (list <condition>) '() #F)) 
  133. (define <warning>
  134.   (make-dylan-class '<warning> (list <condition>) '() #F)) 
  135. (define <restart>
  136.   (make-dylan-class '<restart> (list <condition>) '() #F)) 
  137. (define <error>
  138.   (make-dylan-class '<error> (list <serious-condition>) '() #F)) 
  139. (define <simple-error>
  140.   (make-dylan-class '<simple-error> (list <error>) '() #F)) 
  141. (define <type-error>
  142.   (make-dylan-class '<type-error> (list <error>) '() #F)) 
  143. (define <simple-warning>
  144.   (make-dylan-class '<simple-warning> (list <warning>) '() #F)) 
  145. (define <simple-restart>
  146.   (make-dylan-class '<simple-restart> (list <restart>) '() #F)) 
  147. (define <abort>
  148.   (make-dylan-class '<abort> (list <restart>) '() #F)) 
  149.  
  150. ;;;; Others
  151.  
  152. (define <function>            ; Abstract
  153.   (make-dylan-class '<function> (list <object>) '() #F))
  154. (define <generic-function>        ; Instantiable
  155.   (make-dylan-class '<generic-function> (list <function>) '() #F))
  156. (define <method>            ; Abstract
  157.   (make-dylan-class '<method> (list <function>) '() #F))
  158. (define <class>                ; Abstract
  159.   (make-dylan-class '<class> (list <object>) '() #F))
  160. (define <slot-descriptor>        ; Abstract
  161.   (make-dylan-class '<slot-descriptor> (list <object>) '() #F))
  162. (define <singleton>            ; Abstract
  163.   (make-dylan-class '<singleton> (list <object>) '() #F))
  164. (define <symbol>            ; Instantiable
  165.   (make-dylan-class '<symbol> (list <object>) '() #F))
  166. (define <keyword>            ; Instantiable
  167.   (make-dylan-class '<keyword> (list <object>) '() #F))
  168. (define <character>            ; Instantiable
  169.   (make-dylan-class '<character> (list <object>) '() #F))
  170.